home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / taito_f2.c < prev    next >
C/C++ Source or Header  |  2000-05-22  |  61KB  |  1,639 lines

  1. /***************************************************************************
  2.  
  3. Taito F2 System
  4.  
  5. driver by Brad Oliver, Andrew Prime, with help from Richard Bush
  6.  
  7. TODO:
  8. - growl_05.rom is not being used, does the YM2610 need separate ROM regions
  9.   like NeoGeo?
  10.  
  11. The Taito F2 system is a fairly flexible hardware platform. It supports 4
  12. separate layers of graphics - one 64x64 tiled scrolling background plane
  13. of 8x8 tiles, a similar foreground plane, a sprite plane capable of handling
  14. all the video chores by itself (used in e.g. Super Space Invaders) and a text
  15. plane which may or may not scroll. The text plane has 8x8 characters which are
  16. generated in RAM.
  17.  
  18. Sound is handled by a Z80 with a YM2610 connected to it.
  19.  
  20. The memory map for each of the games is similar but not identical.
  21.  
  22. Memory map for Liquid Kids
  23.  
  24. CPU 1 : 68000, uses irqs 5 & 6.
  25.  
  26. 0x000000 - 0x0fffff : ROM (not all used)
  27. 0x100000 - 0x10ffff : 64k of RAM
  28. 0x200000 - 0x201fff : palette RAM, 4096 total colors
  29. 0x300000 - 0x30000f : input ports and dipswitches (writes may be IRQ acknowledge)
  30. 0x320000 - 0x320003 : communication with sound CPU
  31. 0x800000 - 0x803fff : 64x64 background layer
  32. 0x804000 - 0x805fff : 64x64 text layer
  33. 0x806000 - 0x807fff : 256 (512?) character generator RAM
  34. 0x808000 - 0x80bfff : 64x64 foreground layer
  35. 0x80c000 - 0x80ffff : unused?
  36. 0x820000 - 0x820005 : x scroll for 3 layers (3rd is unknown)
  37. 0x820006 - 0x82000b : y scroll for 3 layers (3rd is unknown)
  38. 0x82000c - 0x82000f : unknown (leds?)
  39. 0x900000 - 0x90ffff : 64k of sprite RAM
  40. 0xb00002 - 0xb00002 : watchdog?
  41.  
  42. TODO:
  43.     * Dipswitches are wrong
  44.     * No high score save yet
  45.  
  46. F2 Game List
  47.  
  48. ? Final Blow (unknown)
  49. . Mega Blast (3)
  50. . http://www.taito.co.jp/his/A_HIS/HTM/QUI_TORI.HTM (4)
  51. . Liquid Kids (7)
  52. . Super Space Invaders / Majestic 12 (8)
  53. . Gun Frontier (9)
  54. . Growl / Runark (10)
  55. . Hat Trick Pro (11)
  56. . Mahjong Quest (12)
  57. . http://www.taito.co.jp/his/A_HIS/HTM/YOUYU.HTM (13)
  58. . http://www.taito.co.jp/his/A_HIS/HTM/KOSHIEN.HTM (14)
  59. . Ninja Kids (15)
  60. . http://www.taito.co.jp/his/A_HIS/HTM/Q_QUEST.HTM (no number)
  61. . Metal Black (no number)
  62. . http://www.taito.co.jp/his/A_HIS/HTM/QUI_TIK.HTM (no number)
  63. ? Dinorex (no number)
  64. ? Pulirula (no number)
  65.  
  66. This list is translated version of
  67. http://www.aianet.or.jp/~eisetu/rom/rom_tait.html
  68. This page also contains info for other Taito boards.
  69.  
  70. F2 Motherboard ( Big ) K1100432A, J1100183A
  71.                (Small) K1100608A, J1100242A
  72.  
  73. *Apr.1989 Final Blow (B82, M4300123A, K1100433A)
  74. *Jul.1989 Don Doko Don (B95, M4300131A, K1100454A, J1100195A)
  75. *Oct.1989 Mega Blast (C11)
  76. Feb.1990 Quiz Torimonochou (C41, K1100554A)
  77. *Apr.1990 Cameltry (C38, M4300167A, K1100556A)
  78. Jul.1990 Quiz H.Q. (C53, K1100594A)
  79. *Aug.1990 Thunder Fox (C28, M4300181A, K1100580A) (exists in F1 version too)
  80. *Sep.1990 Liquid Kids/Mizubaku Daibouken (C49, K1100593A)
  81. *Nov.1990 MJ-12/Super Space Invaders (C64, M4300195A, K1100616A, J1100248A)
  82. Jan.1991 Gun Frontier (C71, M4300199A, K1100625A, K1100629A(overseas))
  83. *Feb.1991 Growl/Runark (C74, M4300210A, K1100639A)
  84. Mar.1991 Hat Trick Hero/Euro Football Championship (C80, K11J0646A)
  85. Mar.1991 Yuu-yu no Quiz de Go!Go! (C83, K11J0652A)
  86. Apr.1991 Ah Eikou no Koshien (C81, M43J0214A, K11J654A)
  87. *Apr.1991 Ninja Kids (C85, M43J0217A, K11J0659A)
  88. May.1991 Mahjong Quest (C77, K1100637A, K1100637B)
  89. Jul.1991 Quiz Quest (C92, K11J0678A)
  90. Sep.1991 Metal Black (D12)
  91. Oct.1991 Drift Out (Visco) (M43X0241A, K11X0695A)
  92. *Nov.1991 PuLiRuLa (C98, M43J0225A, K11J0672A)
  93. Feb.1992 Quiz Chikyu Boueigun (D19, K11J0705A)
  94. Jul.1992 Dead Connection (D28, K11J0715A)
  95. *Nov.1992 Dinorex (D39, K11J0254A)
  96. Mar.1993 Quiz Jinsei Gekijou (D48, M43J0262A, K11J0742A)
  97. Aug.1993 Quiz Crayon Shinchan (D55, K11J0758A)
  98. Dec.1993 Crayon Shinchan Orato Asobo (D63, M43J0276A, K11J0779A)
  99.  
  100. Mar.1992 Yes.No. Shinri Tokimeki Chart (Fortune teller machine) (D20, K11J0706B)
  101.  
  102. * means emulated by Raine. I don't know driftout in Raine is
  103. F2 version or not.
  104. Thunder Fox, Drift Out, "Quiz Crayon Shinchan", and "Crayon Shinchan
  105. Orato Asobo" has "Not F2" version PCB.
  106. Foreign version of Cameltry uses different hardware (B89's PLD,
  107. K1100573A, K1100574A).
  108.  
  109. ***************************************************************************/
  110.  
  111. #include "driver.h"
  112. #include "cpu/m68000/m68000.h"
  113. #include "vidhrdw/generic.h"
  114.  
  115. extern unsigned char *taitof2_scrollx;
  116. extern unsigned char *taitof2_scrolly;
  117. extern unsigned char *f2_backgroundram;
  118. extern size_t f2_backgroundram_size;
  119. extern unsigned char *f2_foregroundram;
  120. extern size_t f2_foregroundram_size;
  121. extern unsigned char *f2_textram;
  122. extern size_t f2_textram_size;
  123. extern unsigned char *taitof2_characterram;
  124. extern size_t f2_characterram_size;
  125. extern size_t f2_paletteram_size;
  126.  
  127. int taitof2_vh_start (void);
  128. void taitof2_vh_stop (void);
  129. READ_HANDLER( taitof2_characterram_r );
  130. WRITE_HANDLER( taitof2_characterram_w );
  131. READ_HANDLER( taitof2_text_r );
  132. WRITE_HANDLER( taitof2_text_w );
  133. READ_HANDLER( taitof2_background_r );
  134. WRITE_HANDLER( taitof2_background_w );
  135. READ_HANDLER( taitof2_foreground_r );
  136. WRITE_HANDLER( taitof2_foreground_w );
  137. WRITE_HANDLER( taitof2_spritebank_w );
  138. void taitof2_vh_screenrefresh (struct osd_bitmap *bitmap,int full_refresh);
  139.  
  140. READ_HANDLER( ssi_videoram_r );
  141. WRITE_HANDLER( ssi_videoram_w );
  142.  
  143. WRITE_HANDLER( rastan_sound_port_w );
  144. WRITE_HANDLER( rastan_sound_comm_w );
  145. READ_HANDLER( rastan_sound_comm_r );
  146.  
  147. READ_HANDLER( rastan_a001_r );
  148. WRITE_HANDLER( rastan_a000_w );
  149. WRITE_HANDLER( rastan_a001_w );
  150.  
  151. WRITE_HANDLER( ssi_sound_w );
  152. READ_HANDLER( ssi_sound_r );
  153.  
  154. void cchip1_init_machine(void);
  155. READ_HANDLER( cchip1_r );
  156. WRITE_HANDLER( cchip1_w );
  157.  
  158. static unsigned char *taitof2_ram; /* used for high score save */
  159.  
  160. static WRITE_HANDLER( bankswitch_w )
  161. {
  162.     unsigned char *RAM = memory_region(REGION_CPU2);
  163.     int banknum = (data - 1) & 7;
  164.  
  165.     cpu_setbank (2, &RAM [0x10000 + (banknum * 0x4000)]);
  166. }
  167.  
  168. static READ_HANDLER( taitof2_input_r )
  169. {
  170.     switch (offset)
  171.     {
  172.          case 0x00:
  173.               return readinputport(3); /* DSW A */
  174.  
  175.          case 0x02:
  176.               return readinputport(4); /* DSW B */
  177.  
  178.          case 0x04:
  179.               return readinputport(0); /* IN0 */
  180.  
  181.          case 0x06:
  182.               return readinputport(1); /* IN1 */
  183.  
  184.          case 0x0e:
  185.               return readinputport(2); /* IN2 */
  186.     }
  187.  
  188. logerror("CPU #0 input_r offset %06x: warning - read unmapped memory address %06x\n",cpu_get_pc(),offset);
  189.  
  190.     return 0xff;
  191. }
  192.  
  193. static READ_HANDLER( growl_dsw_r )
  194. {
  195.     switch (offset)
  196.     {
  197.          case 0x00:
  198.               return readinputport(3); /* DSW A */
  199.  
  200.          case 0x02:
  201.               return readinputport(4); /* DSW B */
  202.     }
  203.  
  204. logerror("CPU #0 dsw_r offset %06x: warning - read unmapped memory address %06x\n",cpu_get_pc(),offset);
  205.  
  206.     return 0xff;
  207. }
  208.  
  209. static READ_HANDLER( growl_input_r )
  210. {
  211.     switch (offset)
  212.     {
  213.          case 0x00:
  214.               return readinputport(0); /* IN0 */
  215.  
  216.          case 0x02:
  217.               return readinputport(1); /* IN1 */
  218.  
  219.          case 0x04:
  220.               return readinputport(2); /* IN2 */
  221.  
  222.     }
  223.  
  224. logerror("CPU #0 input_r offset %06x: warning - read unmapped memory address %06x\n",cpu_get_pc(),offset);
  225.  
  226.     return 0xff;
  227. }
  228.  
  229. static READ_HANDLER( pulirula_input_r )
  230. {
  231. //    Debugger ();
  232.  
  233.     switch (offset)
  234.     {
  235.          case 0x04:
  236.               return readinputport(0); /* IN0 */
  237.  
  238.          case 0x06:
  239.               return readinputport(1); /* IN1 */
  240.  
  241.          case 0x0e:
  242.               return readinputport(2); /* IN2 */
  243.     }
  244.  
  245. logerror("CPU #0 input_r offset %06x: warning - read unmapped memory address %06x\n",cpu_get_pc(),offset);
  246.  
  247.     return 0xff;
  248. }
  249.  
  250. READ_HANDLER( megab_input_r )
  251. {
  252.     switch (offset)
  253.     {
  254.         case 0x00:
  255.             return readinputport (0);
  256.         case 0x02:
  257.             return readinputport (1);
  258.         case 0x04:
  259.             return readinputport (2);
  260.         case 0x06:
  261.             return readinputport (3);
  262.         default:
  263.             logerror("megab_input_r offset: %04x\n", offset);
  264.             return 0xff;
  265.     }
  266. }
  267.  
  268. void liquidk_interrupt5(int x)
  269. {
  270.     cpu_cause_interrupt(0,MC68000_IRQ_5);
  271. }
  272.  
  273. static int liquidk_interrupt(void)
  274. {
  275.     timer_set(TIME_IN_CYCLES(200000-5000,0),0,liquidk_interrupt5);
  276.     return MC68000_IRQ_6;
  277. }
  278.  
  279. WRITE_HANDLER( taitof2_sound_w )
  280. {
  281.     if (offset == 0)
  282.         rastan_sound_port_w (0, data & 0xff);
  283.     else if (offset == 2)
  284.         rastan_sound_comm_w (0, data & 0xff);
  285. }
  286.  
  287. READ_HANDLER( taitof2_sound_r )
  288. {
  289.     if (offset == 2)
  290.         return ((rastan_sound_comm_r (0) & 0xff));
  291.     else return 0;
  292. }
  293.  
  294. static READ_HANDLER( sound_hack_r )
  295. {
  296.     return YM2610_status_port_0_A_r (0) | 1;
  297. }
  298.  
  299.  
  300. /************************************
  301. **                                  *
  302. **PALETTE FINALBLOW  -  START HERE  *
  303. **                                  *
  304. ************************************/
  305.  
  306.  
  307. static unsigned int pal_ind = 0;
  308. static unsigned int pal_tab[ 0x1000 ];
  309.  
  310. static WRITE_HANDLER( finalb_palette_w )
  311. {
  312.     if (offset==0)
  313.     {
  314.         /*data = palette register number (memory offset)*/
  315.  
  316.         pal_ind = (data>>1) & 0x7ff;
  317. /*note:
  318. *In test mode game writes to odd register number (that's why it is (data>>1) )
  319. */
  320.  
  321.         if (data>0xfff) logerror ("write to palette index > 0xfff\n");
  322.     }
  323.     else if (offset==2)
  324.     {
  325.         /*data = palette BGR value*/
  326.         int r,g,b;
  327.  
  328.         pal_tab[ pal_ind ] = data & 0xffff;
  329.  
  330.  
  331.         /* FWIW all r,g,b values seem to be using only top 4 bits */
  332.         r = (data>>0)  & 0x1f;
  333.         g = (data>>5)  & 0x1f;
  334.         b = (data>>10) & 0x1f;
  335.  
  336.         r = (r<<3) | (r>>2);
  337.         g = (g<<3) | (g>>2);
  338.         b = (b<<3) | (b>>2);
  339.  
  340.         palette_change_color(pal_ind,r,g,b);
  341.         /*logerror ("write %04x to palette index %04x [r=%x g=%x b=%x]\n",data, pal_ind,r,g,b);*/
  342.     }
  343. }
  344.  
  345. static READ_HANDLER( finalb_palette_r )
  346. {
  347.     if (offset == 2)
  348.     {
  349.         /*logerror ("reading val %04x from palette index %04x\n",pal_tab[pal_ind], pal_ind);*/
  350.         return pal_tab[ pal_ind ];
  351.     }
  352.     return -1;
  353. }
  354.  
  355.  
  356. static struct MemoryReadAddress finalb_readmem[] =
  357. {
  358.     { 0x000000, 0x07ffff, MRA_ROM },
  359.     { 0x100000, 0x10ffff, MRA_BANK1 },
  360.  
  361.  
  362.     { 0x200000, 0x200003, finalb_palette_r },
  363.  
  364.  
  365.  
  366.     { 0x300000, 0x30000f, taitof2_input_r },
  367.     { 0x320000, 0x320003, taitof2_sound_r },
  368.     { 0x800000, 0x803fff, taitof2_background_r },
  369.     { 0x804000, 0x805fff, taitof2_text_r },
  370.     { 0x806000, 0x806fff, taitof2_characterram_r },
  371.     { 0x807000, 0x807fff, MRA_BANK3 },
  372.     { 0x808000, 0x80bfff, taitof2_foreground_r },
  373.     { 0x80c000, 0x80ffff, MRA_BANK4 },
  374.     { 0x900000, 0x90ffff, ssi_videoram_r },
  375.     { -1 }  /* end of table */
  376. };
  377.  
  378. static struct MemoryWriteAddress finalb_writemem[] =
  379. {
  380.     { 0x000000, 0x07ffff, MWA_ROM },
  381.     { 0x100000, 0x10ffff, MWA_BANK1, &taitof2_ram },
  382.  
  383.  
  384.     { 0x200000, 0x200003, finalb_palette_w },
  385.  
  386.  
  387.  
  388.  
  389.     { 0x300000, 0x300001, MWA_NOP }, /* irq ack? liquidk */
  390.     { 0x300008, 0x300009, MWA_NOP }, /* lots of zero writes here */
  391.     { 0x320000, 0x320003, taitof2_sound_w },
  392.     { 0x800000, 0x803fff, taitof2_background_w, &f2_backgroundram, &f2_backgroundram_size }, /* background layer */
  393.     { 0x804000, 0x805fff, taitof2_text_w, &f2_textram, &f2_textram_size }, /* text layer */
  394.     { 0x806000, 0x806fff, taitof2_characterram_w, &taitof2_characterram, &f2_characterram_size },
  395.     { 0x807000, 0x807fff, MWA_BANK3 }, /* unused? */
  396.     { 0x808000, 0x80bfff, taitof2_foreground_w, &f2_foregroundram, &f2_foregroundram_size }, /* foreground layer */
  397.     { 0x80c000, 0x80ffff, MWA_BANK4 }, /* unused? */
  398.     { 0x810000, 0x81ffff, MWA_NOP },    /*error in game init code ?*/
  399.     { 0x820000, 0x820005, MWA_BANK5, &taitof2_scrollx },
  400.     { 0x820006, 0x82000b, MWA_BANK6, &taitof2_scrolly },
  401.     { 0x900000, 0x90ffff, ssi_videoram_w, &videoram, &videoram_size  },
  402.     { 0xb00002, 0xb00003, MWA_NOP },    /* watchdog ?? liquidk */
  403.     { -1 }  /* end of table */
  404. };
  405.  
  406. static struct MemoryReadAddress liquidk_readmem[] =
  407. {
  408.     { 0x000000, 0x07ffff, MRA_ROM },
  409.     { 0x100000, 0x10ffff, MRA_BANK1 },
  410.     { 0x200000, 0x201fff, paletteram_word_r },
  411.     { 0x300000, 0x30000f, taitof2_input_r },
  412.     { 0x320000, 0x320003, taitof2_sound_r },
  413.     { 0x800000, 0x803fff, taitof2_background_r },
  414.     { 0x804000, 0x805fff, taitof2_text_r },
  415.     { 0x806000, 0x806fff, taitof2_characterram_r },
  416.     { 0x807000, 0x807fff, MRA_BANK3 },
  417.     { 0x808000, 0x80bfff, taitof2_foreground_r },
  418.     { 0x80c000, 0x80ffff, MRA_BANK4 },
  419.     { 0x900000, 0x90ffff, ssi_videoram_r },
  420.     { -1 }  /* end of table */
  421. };
  422.  
  423. static struct MemoryWriteAddress liquidk_writemem[] =
  424. {
  425.     { 0x000000, 0x07ffff, MWA_ROM },
  426.     { 0x100000, 0x10ffff, MWA_BANK1, &taitof2_ram },
  427.     { 0x200000, 0x201fff, paletteram_RRRRGGGGBBBBxxxx_word_w, &paletteram, &f2_paletteram_size },
  428.     { 0x300000, 0x300001, MWA_NOP }, /* irq ack? liquidk */
  429.     { 0x320000, 0x320003, taitof2_sound_w },
  430.     { 0x800000, 0x803fff, taitof2_background_w, &f2_backgroundram, &f2_backgroundram_size }, /* background layer */
  431.     { 0x804000, 0x805fff, taitof2_text_w, &f2_textram, &f2_textram_size }, /* text layer */
  432.     { 0x806000, 0x806fff, taitof2_characterram_w, &taitof2_characterram, &f2_characterram_size },
  433.     { 0x807000, 0x807fff, MWA_BANK3 }, /* unused? */
  434.     { 0x808000, 0x80bfff, taitof2_foreground_w, &f2_foregroundram, &f2_foregroundram_size }, /* foreground layer */
  435.     { 0x80c000, 0x80ffff, MWA_BANK4 }, /* unused? */
  436.     { 0x820000, 0x820005, MWA_BANK5, &taitof2_scrollx },
  437.     { 0x820006, 0x82000b, MWA_BANK6, &taitof2_scrolly },
  438.     { 0x900000, 0x90ffff, ssi_videoram_w, &videoram, &videoram_size  },
  439.     { 0xb00002, 0xb00003, MWA_NOP },    /* watchdog ?? liquidk */
  440.     { -1 }  /* end of table */
  441. };
  442.  
  443. static struct MemoryReadAddress growl_readmem[] =
  444. {
  445.     { 0x000000, 0x0fffff, MRA_ROM },
  446.     { 0x100000, 0x10ffff, MRA_BANK1 },
  447.     { 0x200000, 0x201fff, paletteram_word_r },
  448.     { 0x300000, 0x30000f, growl_dsw_r },
  449.     { 0x320000, 0x32000f, growl_input_r },
  450.     { 0x400000, 0x400003, ssi_sound_r },
  451.     { 0x508000, 0x50800f, input_port_5_r }, /* IN3 */
  452.     { 0x50c000, 0x50c00f, input_port_6_r }, /* IN4 */
  453.     { 0x800000, 0x803fff, taitof2_background_r },
  454.     { 0x804000, 0x805fff, taitof2_text_r },
  455.     { 0x806000, 0x806fff, taitof2_characterram_r },
  456.     { 0x807000, 0x807fff, MRA_BANK3 },
  457.     { 0x808000, 0x80bfff, taitof2_foreground_r },
  458.     { 0x80c000, 0x80ffff, MRA_BANK4 },
  459.     { 0x900000, 0x90ffff, ssi_videoram_r },
  460.     { -1 }  /* end of table */
  461. };
  462.  
  463. static struct MemoryWriteAddress growl_writemem[] =
  464. {
  465.     { 0x000000, 0x0fffff, MWA_ROM },
  466.     { 0x100000, 0x10ffff, MWA_BANK1, &taitof2_ram },
  467.     { 0x200000, 0x201fff, paletteram_RRRRGGGGBBBBxxxx_word_w, &paletteram, &f2_paletteram_size },
  468.     { 0x340000, 0x340001, MWA_NOP }, /* irq ack? growl */
  469.     { 0x400000, 0x400003, ssi_sound_w },
  470.     { 0x500000, 0x50000f, taitof2_spritebank_w },
  471.     { 0x800000, 0x803fff, taitof2_background_w, &f2_backgroundram, &f2_backgroundram_size }, /* background layer */
  472.     { 0x804000, 0x805fff, taitof2_text_w, &f2_textram, &f2_textram_size }, /* text layer */
  473.     { 0x806000, 0x806fff, taitof2_characterram_w, &taitof2_characterram, &f2_characterram_size },
  474.     { 0x807000, 0x807fff, MWA_BANK3 }, /* unused? */
  475.     { 0x808000, 0x80bfff, taitof2_foreground_w, &f2_foregroundram, &f2_foregroundram_size }, /* foreground layer */
  476.     { 0x80c000, 0x80ffff, MWA_BANK4 }, /* unused? */
  477.     { 0x820000, 0x820005, MWA_BANK5, &taitof2_scrollx },
  478.     { 0x820006, 0x82000b, MWA_BANK6, &taitof2_scrolly },
  479.     { 0x900000, 0x90ffff, ssi_videoram_w, &videoram, &videoram_size  },
  480.     { 0xb00000, 0xb00001, MWA_NOP },    /* watchdog ?? growl */
  481.     { -1 }  /* end of table */
  482. };
  483.  
  484. static struct MemoryReadAddress pulirula_readmem[] =
  485. {
  486.     { 0x000000, 0x07ffff, MRA_ROM },
  487.     { 0x200000, 0x200003, ssi_sound_r },
  488.     { 0x300000, 0x30ffff, MRA_BANK1 },
  489. //    { 0x400000, 0x400003, ssi_sound_r },
  490. //    { 0x508000, 0x50800f, input_port_5_r }, /* IN3 */
  491. //    { 0x50c000, 0x50c00f, input_port_6_r }, /* IN4 */
  492.     { 0x400000, 0x401fff, MRA_BANK7 }, /* pivot RAM? */
  493.     { 0x700000, 0x701fff, paletteram_word_r },
  494.     { 0x800000, 0x803fff, taitof2_background_r },
  495.     { 0x804000, 0x805fff, taitof2_text_r },
  496.     { 0x806000, 0x806fff, taitof2_characterram_r },
  497.     { 0x807000, 0x807fff, MRA_BANK3 },
  498.     { 0x808000, 0x80bfff, taitof2_foreground_r },
  499.     { 0x80c000, 0x80ffff, MRA_BANK4 },
  500.     { 0x900000, 0x90ffff, ssi_videoram_r },
  501.     { 0xb00000, 0xb0000f, taitof2_input_r },
  502.     { -1 }  /* end of table */
  503. };
  504.  
  505. static struct MemoryWriteAddress pulirula_writemem[] =
  506. {
  507.     { 0x000000, 0x07ffff, MWA_ROM },
  508.     { 0x200000, 0x200003, ssi_sound_w },
  509.     { 0x300000, 0x30ffff, MWA_BANK1, &taitof2_ram },
  510. //    { 0x400000, 0x400003, ssi_sound_w },
  511. //    { 0x500000, 0x50000f, taitof2_spritebank_w },
  512.     { 0x400000, 0x401fff, MWA_BANK7 }, /* pivot RAM? */
  513. //    { 0x402000, 0x40200f, MWA_NOP }, /* ??????????? */
  514.     { 0x700000, 0x701fff, paletteram_xRRRRRGGGGGBBBBB_word_w, &paletteram, &f2_paletteram_size },
  515.     { 0x800000, 0x803fff, taitof2_background_w, &f2_backgroundram, &f2_backgroundram_size }, /* background layer */
  516.     { 0x804000, 0x805fff, taitof2_text_w, &f2_textram, &f2_textram_size }, /* text layer */
  517.     { 0x806000, 0x806fff, taitof2_characterram_w, &taitof2_characterram, &f2_characterram_size },
  518.     { 0x807000, 0x807fff, MWA_BANK3 }, /* unused? */
  519.     { 0x808000, 0x80bfff, taitof2_foreground_w, &f2_foregroundram, &f2_foregroundram_size }, /* foreground layer */
  520.     { 0x80c000, 0x80ffff, MWA_BANK4 }, /* unused? */
  521.     { 0x820000, 0x820005, MWA_BANK5, &taitof2_scrollx },
  522.     { 0x820006, 0x82000b, MWA_BANK6, &taitof2_scrolly },
  523.     { 0x900000, 0x90ffff, ssi_videoram_w, &videoram, &videoram_size  },
  524.     { 0xa00000, 0xa00001, MWA_NOP },    /* watchdog ?? */
  525. //    { 0xb00000, 0xb00001, MWA_NOP },    /* watchdog ?? */
  526.     { 0xb00000, 0xb0000f, taitof2_spritebank_w },
  527.     { -1 }  /* end of table */
  528. };
  529.  
  530. static struct MemoryReadAddress megab_readmem[] =
  531. {
  532.     { 0x000000, 0x0fffff, MRA_ROM },
  533.     { 0x100000, 0x100003, ssi_sound_r },
  534.     { 0x120000, 0x12000f, megab_input_r },
  535.     { 0x180000, 0x180fff, cchip1_r },
  536.     { 0x200000, 0x20ffff, MRA_BANK1 },
  537.     { 0x300000, 0x301fff, paletteram_word_r },
  538.     { 0x600000, 0x603fff, taitof2_background_r },
  539.     { 0x604000, 0x605fff, taitof2_text_r },
  540.     { 0x606000, 0x606fff, taitof2_characterram_r },
  541.     { 0x607000, 0x607fff, MRA_BANK3 },
  542.     { 0x608000, 0x60bfff, taitof2_foreground_r },
  543.     { 0x60c000, 0x60ffff, MRA_BANK4 },
  544.     { 0x610000, 0x61ffff, MRA_BANK7 }, /* unused? */
  545.     { 0x800000, 0x80ffff, ssi_videoram_r },
  546.     { -1 }  /* end of table */
  547. };
  548.  
  549. static struct MemoryWriteAddress megab_writemem[] =
  550. {
  551.     { 0x000000, 0x0fffff, MWA_ROM },
  552.     { 0x200000, 0x20ffff, MWA_BANK1 },
  553.     { 0x300000, 0x301fff, paletteram_RRRRGGGGBBBBxxxx_word_w, &paletteram, &f2_paletteram_size },
  554.     { 0x100000, 0x100003, ssi_sound_w },
  555.     { 0x120000, 0x120001, MWA_NOP }, /* irq ack? */
  556.     { 0x180000, 0x180fff, cchip1_w },
  557.     { 0x400000, 0x400001, MWA_NOP },    /* watchdog ?? */
  558.     { 0x600000, 0x603fff, taitof2_background_w, &f2_backgroundram, &f2_backgroundram_size }, /* background layer */
  559.     { 0x604000, 0x605fff, taitof2_text_w, &f2_textram, &f2_textram_size }, /* text layer */
  560.     { 0x606000, 0x606fff, taitof2_characterram_w, &taitof2_characterram, &f2_characterram_size },
  561.     { 0x607000, 0x607fff, MWA_BANK3 }, /* unused? */
  562.     { 0x608000, 0x60bfff, taitof2_foreground_w, &f2_foregroundram, &f2_foregroundram_size }, /* foreground layer */
  563.     { 0x60c000, 0x60ffff, MWA_BANK4 }, /* unused? */
  564.     { 0x610000, 0x61ffff, MWA_BANK7 }, /* unused? */
  565.     { 0x620000, 0x620005, MWA_BANK5, &taitof2_scrollx },
  566.     { 0x620006, 0x62000b, MWA_BANK6, &taitof2_scrolly },
  567.     { 0x800000, 0x80ffff, ssi_videoram_w, &videoram, &videoram_size  },
  568.     { -1 }  /* end of table */
  569. };
  570.  
  571.  
  572. static struct MemoryReadAddress sound_readmem[] =
  573. {
  574.     { 0x0000, 0x3fff, MRA_ROM },
  575.     { 0x4000, 0x7fff, MRA_BANK2 },
  576.     { 0xc000, 0xdfff, MRA_RAM },
  577.     { 0xe000, 0xe000, sound_hack_r },
  578. //    { 0xe000, 0xe000, YM2610_status_port_0_A_r },
  579.     { 0xe001, 0xe001, YM2610_read_port_0_r },
  580.     { 0xe002, 0xe002, YM2610_status_port_0_B_r },
  581.     { 0xe200, 0xe200, MRA_NOP },
  582.     { 0xe201, 0xe201, rastan_a001_r },
  583.     { 0xea00, 0xea00, MRA_NOP },
  584.     { -1 }  /* end of table */
  585. };
  586.  
  587. static struct MemoryWriteAddress sound_writemem[] =
  588. {
  589.     { 0x0000, 0x7fff, MWA_ROM },
  590.     { 0xc000, 0xdfff, MWA_RAM },
  591.     { 0xe000, 0xe000, YM2610_control_port_0_A_w },
  592.     { 0xe001, 0xe001, YM2610_data_port_0_A_w },
  593.     { 0xe002, 0xe002, YM2610_control_port_0_B_w },
  594.     { 0xe003, 0xe003, YM2610_data_port_0_B_w },
  595.     { 0xe200, 0xe200, rastan_a000_w },
  596.     { 0xe201, 0xe201, rastan_a001_w },
  597.     { 0xe400, 0xe403, MWA_NOP }, /* pan */
  598.     { 0xee00, 0xee00, MWA_NOP }, /* ? */
  599.     { 0xf000, 0xf000, MWA_NOP }, /* ? */
  600.     { 0xf200, 0xf200, bankswitch_w },    /* ?? */
  601.     { -1 }  /* end of table */
  602. };
  603.  
  604.  
  605. INPUT_PORTS_START( liquidk )
  606.     PORT_START      /* IN0 */
  607.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  608.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  609.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  610.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  611.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  612.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  613.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  614.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1)
  615.  
  616.     PORT_START      /* IN1 */
  617.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  618.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  619.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  620.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  621.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  622.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  623.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  624.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2)
  625.  
  626.     PORT_START      /* IN2 */
  627.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )
  628.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
  629.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
  630.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
  631.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  632.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  633.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  634.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  635.  
  636.     PORT_START /* DSW A */
  637.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
  638.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  639.     PORT_DIPSETTING(    0x01, DEF_STR( Cocktail ) )
  640.     PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
  641.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  642.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  643.     PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
  644.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
  645.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  646.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  647.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )
  648.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  649.     PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
  650.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
  651.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
  652.     PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) )
  653.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) )
  654.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
  655.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_4C ) )
  656.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
  657.  
  658.     PORT_START /* DSW B */
  659.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  660.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  661.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  662.     PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
  663.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  664.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  665.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
  666.     PORT_DIPSETTING(    0x0c, "30k 100k" )
  667.     PORT_DIPSETTING(    0x08, "30k 150k" )
  668.     PORT_DIPSETTING(    0x04, "50k 250k" )
  669.     PORT_DIPSETTING(    0x00, "50k 350k" )
  670.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
  671.     PORT_DIPSETTING(    0x20, "2" )
  672.     PORT_DIPSETTING(    0x30, "3" )
  673.     PORT_DIPSETTING(    0x00, "4" )
  674.     PORT_DIPSETTING(    0x10, "5" )
  675.     PORT_DIPNAME( 0x40, 0x40, "Allow Continue" )
  676.     PORT_DIPSETTING(    0x00, DEF_STR( No ) )
  677.     PORT_DIPSETTING(    0x40, DEF_STR( Yes ) )
  678.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  679.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  680.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  681. INPUT_PORTS_END
  682.  
  683.  
  684. INPUT_PORTS_START( finalb )
  685.     PORT_START      /* IN0 */
  686.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  687.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  688.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  689.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  690.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  691.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  692.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  693.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1)
  694.  
  695.     PORT_START      /* IN1 */
  696.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  697.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  698.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  699.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  700.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  701.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  702.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  703.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2)
  704.  
  705.     PORT_START      /* IN2 */
  706.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )
  707.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
  708.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
  709.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
  710.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  711.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  712.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  713.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  714.  
  715.     PORT_START /* DSW A */
  716.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  717.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  718.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  719.     PORT_DIPNAME( 0x02, 0x02, "Flip Screen?" )
  720.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  721.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  722.     PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
  723.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  724.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  725.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  726.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )
  727.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  728.     PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
  729.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
  730.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
  731.     PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) )
  732.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) )
  733.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
  734.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_4C ) )
  735.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
  736.  
  737.     PORT_START /* DSW B */
  738.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
  739.     PORT_DIPSETTING(    0x02, "Easy" )
  740.     PORT_DIPSETTING(    0x03, "Medium" )
  741.     PORT_DIPSETTING(    0x01, "Hard" )
  742.     PORT_DIPSETTING(    0x00, "Hardest" )
  743.     PORT_DIPNAME( 0x0c, 0x0c, "Shields" )
  744.     PORT_DIPSETTING(    0x00, "None" )
  745.     PORT_DIPSETTING(    0x0c, "1" )
  746.     PORT_DIPSETTING(    0x04, "2" )
  747.     PORT_DIPSETTING(    0x08, "3" )
  748.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Lives ) )
  749.     PORT_DIPSETTING(    0x00, "2" )
  750.     PORT_DIPSETTING(    0x10, "3" )
  751.     PORT_DIPNAME( 0x20, 0x20, "2 Players Mode" )
  752.     PORT_DIPSETTING(    0x00, "Alternate" )
  753.     PORT_DIPSETTING(    0x20, "Simultaneous" )
  754.     PORT_DIPNAME( 0x40, 0x40, "Allow Continue" )
  755.     PORT_DIPSETTING(    0x00, DEF_STR( No ) )
  756.     PORT_DIPSETTING(    0x40, DEF_STR( Yes ) )
  757.     PORT_DIPNAME( 0x80, 0x80, "Allow Simultaneous Game" )
  758.     PORT_DIPSETTING(    0x00, DEF_STR( No ) )
  759.     PORT_DIPSETTING(    0x80, DEF_STR( Yes ) )
  760. INPUT_PORTS_END
  761.  
  762. INPUT_PORTS_START( growl )
  763.     PORT_START      /* IN0 */
  764.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  765.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  766.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  767.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  768.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  769.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  770.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
  771.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  772.  
  773.     PORT_START      /* IN1 */
  774.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  775.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  776.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  777.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  778.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  779.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  780.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  781.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
  782.  
  783.     PORT_START      /* IN2 */
  784.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )
  785.     PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_SERVICE, "Service A", KEYCODE_9, IP_JOY_NONE )
  786.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
  787.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
  788.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  789.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  790.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  791.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  792.  
  793.     PORT_START /* DSW A */
  794.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  795.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  796.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  797.     PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
  798.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  799.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  800.     PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
  801.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
  802.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  803.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  804.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )
  805.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  806.     PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
  807.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
  808.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
  809.     PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) )
  810.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) )
  811.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
  812.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_4C ) )
  813.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
  814.  
  815.     PORT_START /* DSW B */
  816.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
  817.     PORT_DIPSETTING(    0x02, "Easy" )
  818.     PORT_DIPSETTING(    0x03, "Medium" )
  819.     PORT_DIPSETTING(    0x01, "Hard" )
  820.     PORT_DIPSETTING(    0x00, "Hardest" )
  821.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  822.     PORT_DIPSETTING(    0x04, DEF_STR ( Off ) )
  823.     PORT_DIPSETTING(    0x00, DEF_STR ( On) )
  824.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  825.     PORT_DIPSETTING(    0x08, DEF_STR ( Off ) )
  826.     PORT_DIPSETTING(    0x00, DEF_STR ( On) )
  827.     PORT_DIPNAME( 0x30, 0x30, "Game Type" )
  828.     PORT_DIPSETTING(    0x30, "1 or 2 Players only" )
  829.     PORT_DIPSETTING(    0x20, "Up to 4 Players dipendent" )
  830.     PORT_DIPSETTING(    0x10, "Up to 4 Players indipendent" )
  831. //    PORT_DIPSETTING(    0x00, "Up to 4 Players indipendent" )
  832.     PORT_DIPNAME( 0x40, 0x40, "Last Stage Continue" )
  833.     PORT_DIPSETTING(    0x00, DEF_STR( No ) )
  834.     PORT_DIPSETTING(    0x40, DEF_STR( Yes ) )
  835.     PORT_DIPNAME( 0x80, 0x80, "Unknown" )
  836.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  837.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  838.  
  839.     PORT_START      /* IN3 */
  840.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER3 )
  841.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER3 )
  842.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER3 )
  843.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
  844.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  845.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  846.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
  847.     PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START3 )
  848.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER4 )
  849.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER4 )
  850.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER4 )
  851.     PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
  852.     PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
  853.     PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
  854.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
  855.     PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START4 )
  856.  
  857.     PORT_START      /* IN4 */
  858.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
  859.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 )
  860.     PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_SERVICE, "Service B", KEYCODE_0, IP_JOY_NONE )
  861.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  862.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  863.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  864.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  865.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  866. INPUT_PORTS_END
  867.  
  868. INPUT_PORTS_START( pulirula )
  869.     PORT_START      /* IN0 */
  870.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  871.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  872.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  873.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  874.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  875.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  876.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
  877.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  878.  
  879.     PORT_START      /* IN1 */
  880.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  881.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  882.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  883.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  884.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  885.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  886.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  887.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
  888.  
  889.     PORT_START      /* IN2 */
  890.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )
  891.     PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_SERVICE, "Service A", KEYCODE_9, IP_JOY_NONE )
  892.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
  893.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
  894.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  895.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  896.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  897.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  898.  
  899.     PORT_START /* DSW A */
  900.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  901.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  902.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  903.     PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
  904.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  905.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  906.     PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
  907.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
  908.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  909.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  910.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )
  911.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  912.     PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
  913.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
  914.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
  915.     PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) )
  916.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) )
  917.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
  918.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_4C ) )
  919.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
  920.  
  921.     PORT_START /* DSW B */
  922.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  923.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  924.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  925.     PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
  926.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  927.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  928.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  929.     PORT_DIPSETTING(    0x04, DEF_STR ( Off ) )
  930.     PORT_DIPSETTING(    0x00, DEF_STR ( On) )
  931.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  932.     PORT_DIPSETTING(    0x08, DEF_STR ( Off ) )
  933.     PORT_DIPSETTING(    0x00, DEF_STR ( On) )
  934.     PORT_DIPNAME( 0x30, 0x30, "Game Type" )
  935.     PORT_DIPSETTING(    0x30, "1 or 2 Players only" )
  936.     PORT_DIPSETTING(    0x20, "Up to 4 Players dipendent" )
  937.     PORT_DIPSETTING(    0x10, "Up to 4 Players indipendent" )
  938.     PORT_DIPSETTING(    0x00, "Up to 4 Players indipendent" )
  939.     PORT_DIPNAME( 0x40, 0x40, "Unknown" )
  940.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  941.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  942.     PORT_DIPNAME( 0x80, 0x80, "Unknown" )
  943.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  944.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  945.  
  946.     PORT_START      /* IN3 */
  947.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER3 )
  948.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER3 )
  949.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER3 )
  950.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
  951.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  952.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  953.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
  954.     PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START3 )
  955.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER4 )
  956.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER4 )
  957.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER4 )
  958.     PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
  959.     PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
  960.     PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
  961.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
  962.     PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START4 )
  963.  
  964.     PORT_START      /* IN4 */
  965.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
  966.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 )
  967.     PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_SERVICE, "Service B", KEYCODE_0, IP_JOY_NONE )
  968.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  969.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  970.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  971.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  972.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  973. INPUT_PORTS_END
  974.  
  975. INPUT_PORTS_START( megab )
  976.     PORT_START /* DSW A */
  977.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
  978.     PORT_DIPSETTING(    0x00, "1 Joystick" )
  979.     PORT_DIPSETTING(    0x01, "2 Joysticks" )
  980.     PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
  981.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  982.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  983.     PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
  984.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
  985.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  986.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  987.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  988.  
  989.     PORT_START /* DSW B */
  990.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
  991.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  992.     PORT_DIPSETTING(    0x01, DEF_STR( 3C_1C ) )
  993.     PORT_DIPSETTING(    0x02, DEF_STR( 2C_1C ) )
  994.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
  995.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
  996.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
  997.     PORT_DIPSETTING(    0x08, DEF_STR( 1C_3C ) )
  998.     PORT_DIPSETTING(    0x04, DEF_STR( 1C_4C ) )
  999.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
  1000.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  1001.  
  1002.     PORT_START /* DSW c */
  1003.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
  1004.     PORT_DIPSETTING(    0x03, "Norm" )
  1005.     PORT_DIPSETTING(    0x02, "Easy" )
  1006.     PORT_DIPSETTING(    0x01, "Hard" )
  1007.     PORT_DIPSETTING(    0x00, "Hardest" )
  1008.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
  1009.     PORT_DIPSETTING(    0x0c, "50k, 150k" )
  1010.     PORT_DIPSETTING(    0x0a, "Bonus 2??" )
  1011.     PORT_DIPSETTING(    0x08, "Bonus 3??" )
  1012.     PORT_DIPSETTING(    0x00, "Bonus 4??" )
  1013.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  1014.  
  1015.     PORT_START /* DSW D */
  1016.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
  1017.     PORT_DIPSETTING(    0x03, "3" )
  1018.     PORT_DIPSETTING(    0x02, "2" )
  1019.     PORT_DIPSETTING(    0x01, "4" )
  1020.     PORT_DIPSETTING(    0x00, "5" )
  1021.     PORT_DIPNAME( 0x04, 0x04, "2 Player Mode" )
  1022.     PORT_DIPSETTING(    0x00, "Alternate" )
  1023.     PORT_DIPSETTING(    0x04, "Simultaneous" )
  1024.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  1025.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  1026.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1027.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  1028.  
  1029.     PORT_START      /* IN0 */
  1030.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_PLAYER1 )
  1031.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_PLAYER1 )
  1032.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_PLAYER1 )
  1033.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 )
  1034.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  1035.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1036.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1037.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  1038.  
  1039.     PORT_START      /* IN1 */
  1040.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_PLAYER2 )
  1041.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_PLAYER2 )
  1042.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_PLAYER2 )
  1043.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 )
  1044.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1045.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1046.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1047.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
  1048.  
  1049.     PORT_START      /* IN2 */
  1050.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  1051.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  1052.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
  1053.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT )
  1054.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1055.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1056.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1057.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1058.  
  1059. INPUT_PORTS_END
  1060.  
  1061.  
  1062. static struct GfxLayout tilelayout =
  1063. {
  1064.     16,16,    /* 16*16 sprites */
  1065.     16384,    /* 16384 sprites */
  1066.     4,    /* 4 bits per pixel */
  1067.     { 0, 1, 2, 3 },
  1068.     { 1*4, 0*4, 3*4, 2*4, 5*4, 4*4, 7*4, 6*4, 9*4, 8*4, 11*4, 10*4, 13*4, 12*4, 15*4, 14*4 },
  1069.     { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64, 8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
  1070.     128*8    /* every sprite takes 32 consecutive bytes */
  1071. };
  1072.  
  1073. static struct GfxLayout charlayout =
  1074. {
  1075.     8,8,    /* 8*8 characters */
  1076.     32768,    /* 32768 characters */
  1077.     4,    /* 4 bits per pixel */
  1078.     { 0, 1, 2, 3 },
  1079.     { 2*4, 3*4, 0*4, 1*4, 6*4, 7*4, 4*4, 5*4 },
  1080.     { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
  1081.     32*8    /* every sprite takes 32 consecutive bytes */
  1082. };
  1083.  
  1084. static struct GfxLayout charlayout2 =
  1085. {
  1086.     8,8,    /* 8*8 characters */
  1087.     256,    /* 256 characters */
  1088.     2,    /* 4 bits per pixel */
  1089.     { 0, 8 },
  1090.     { 0, 1, 2, 3, 4, 5, 6, 7 },
  1091.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
  1092.     16*8    /* every sprite takes 16 consecutive bytes */
  1093. };
  1094.  
  1095. #define NUM_TILES 8192
  1096. static struct GfxLayout finalb_tilelayout =
  1097. {
  1098.     16,16,    /* 16*16 sprites */
  1099.     NUM_TILES,    /* 8192 sprites */
  1100.     4,    /* it's really 6 bits per pixel, but I haven't fixed this yet */
  1101.     { 0, 1, 2, 3 },
  1102.     {
  1103.         1*4, 0*4, NUM_TILES*64*8 + 1*4, NUM_TILES*64*8 + 0*4,
  1104.         3*4, 2*4, NUM_TILES*64*8 + 3*4, NUM_TILES*64*8 + 2*4,
  1105.         5*4, 4*4, NUM_TILES*64*8 + 5*4, NUM_TILES*64*8 + 4*4,
  1106.         7*4, 6*4, NUM_TILES*64*8 + 7*4, NUM_TILES*64*8 + 6*4
  1107.     },
  1108.     { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
  1109.     64*8    /* every sprite takes 64 consecutive bytes */
  1110. };
  1111. #undef NUM_TILES
  1112.  
  1113. #define NUM_CHARS 8192
  1114. static struct GfxLayout finalb_charlayout =
  1115. {
  1116.     8,8,    /* 8*8 characters */
  1117.     NUM_CHARS,    /* 8192 characters */
  1118.     4,    /* 4 bits per pixel */
  1119.     { 0, 1, 2, 3 },
  1120.     {
  1121.         NUM_CHARS*16*8 + 0*4, NUM_CHARS*16*8 + 1*4, 0*4, 1*4,
  1122.         NUM_CHARS*16*8 + 2*4, NUM_CHARS*16*8 + 3*4, 2*4, 3*4
  1123.     },
  1124.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
  1125.     16*8    /* every char takes 16 consecutive bytes */
  1126. };
  1127. #undef NUM_CHARS
  1128.  
  1129. static struct GfxDecodeInfo gfxdecodeinfo[] =
  1130. {
  1131.     { REGION_GFX2, 0x0, &tilelayout,  0, 256 },  /* sprites & playfield */
  1132.     { REGION_GFX1, 0x0, &charlayout,  0, 256 },  /* sprites & playfield */
  1133.     { 0, 0x000000, &charlayout2, 0, 256 },    /* the game dynamically modifies this */
  1134.     { -1 } /* end of array */
  1135. };
  1136.  
  1137. static struct GfxDecodeInfo finalb_gfxdecodeinfo[] =
  1138. {
  1139.     { REGION_GFX2, 0x0, &finalb_tilelayout,  0, 256 },  /* sprites & playfield */
  1140.     { REGION_GFX1, 0x0, &finalb_charlayout,  0, 256 },  /* sprites & playfield */
  1141.     { 0, 0x000000, &charlayout2, 0, 256 },    /* the game dynamically modifies this */
  1142.     { -1 } /* end of array */
  1143. };
  1144.  
  1145.  
  1146.  
  1147. /* handler called by the YM2610 emulator when the internal timers cause an IRQ */
  1148. static void irqhandler(int irq)
  1149. {
  1150.     cpu_set_irq_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
  1151. }
  1152.  
  1153. static struct YM2610interface ym2610_interface =
  1154. {
  1155.     1,    /* 1 chip */
  1156.     8000000,    /* 8 MHz ?????? */
  1157.     { 30 },
  1158.     { 0 },
  1159.     { 0 },
  1160.     { 0 },
  1161.     { 0 },
  1162.     { irqhandler },
  1163.     { REGION_SOUND1 },
  1164.     { REGION_SOUND1 },
  1165.     { YM3012_VOL(60,MIXER_PAN_LEFT,60,MIXER_PAN_RIGHT) }
  1166. };
  1167.  
  1168. #if 0
  1169. static struct YM2610interface pulirula_ym2610_interface =
  1170. {
  1171.     1,    /* 1 chip */
  1172.     8000000,    /* 8 MHz ?????? */
  1173.     { 30 },
  1174.     { 0 },
  1175.     { 0 },
  1176.     { 0 },
  1177.     { 0 },
  1178.     { irqhandler },
  1179.     { REGION_SOUND1 },
  1180.     { REGION_SOUND2 },
  1181.     { YM3012_VOL(60,MIXER_PAN_LEFT,60,MIXER_PAN_RIGHT) }
  1182. };
  1183. #endif
  1184.  
  1185.  
  1186. static struct MachineDriver machine_driver_liquidk =
  1187. {
  1188.     /* basic machine hardware */
  1189.     {
  1190.         {
  1191.             CPU_M68000,
  1192.             12000000,    /* 12 MHz ? */
  1193.             liquidk_readmem, liquidk_writemem, 0, 0,
  1194.             liquidk_interrupt, 1
  1195.         },
  1196.         {
  1197.             CPU_Z80 | CPU_AUDIO_CPU,
  1198.             4000000,    /* 4 MHz ??? */
  1199.             sound_readmem, sound_writemem, 0, 0,
  1200.             ignore_interrupt, 0    /* IRQs are triggered by the YM2610 */
  1201.         }
  1202.     },
  1203.     60, 2000,    /* frames per second, vblank duration hand tuned to avoid flicker */
  1204.     1,
  1205.     0,
  1206.  
  1207.     /* video hardware */
  1208.     40*8, 32*8, { 0*8, 40*8-1, 2*8, 30*8-1 },
  1209.  
  1210.     gfxdecodeinfo,
  1211.     4096, 4096,
  1212.     0,
  1213.  
  1214.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_AFTER_VBLANK,
  1215.     0,
  1216.     taitof2_vh_start,
  1217.     taitof2_vh_stop,
  1218.     taitof2_vh_screenrefresh,
  1219.  
  1220.     /* sound hardware */
  1221.     SOUND_SUPPORTS_STEREO,0,0,0,
  1222.     {
  1223.         {
  1224.             SOUND_YM2610,
  1225.             &ym2610_interface
  1226.         }
  1227.     }
  1228. };
  1229.  
  1230. static struct MachineDriver machine_driver_finalb =
  1231. {
  1232.     /* basic machine hardware */
  1233.     {
  1234.         {
  1235.             CPU_M68000,
  1236.             12000000,    /* 12 MHz ??? */
  1237.             finalb_readmem, finalb_writemem, 0, 0,
  1238.             liquidk_interrupt, 1
  1239.         },
  1240.         {
  1241.             CPU_Z80 | CPU_AUDIO_CPU,
  1242.             4000000,    /* 4 MHz ??? */
  1243.             sound_readmem, sound_writemem, 0, 0,
  1244.             ignore_interrupt, 0    /* IRQs are triggered by the YM2610 */
  1245.         }
  1246.     },
  1247.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  1248.     1,
  1249.     0,
  1250.  
  1251.     /* video hardware */
  1252.     40*8, 32*8, { 0*8, 40*8-1, 2*8, 30*8-1 },
  1253.  
  1254.     finalb_gfxdecodeinfo,
  1255.     2048, 2048,
  1256.     0,
  1257.  
  1258.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  1259.     0,
  1260.     taitof2_vh_start,
  1261.     taitof2_vh_stop,
  1262.     taitof2_vh_screenrefresh,
  1263.  
  1264.     /* sound hardware */
  1265.     SOUND_SUPPORTS_STEREO,0,0,0,
  1266.     {
  1267.         {
  1268.             SOUND_YM2610,
  1269.             &ym2610_interface
  1270.         }
  1271.     }
  1272. };
  1273.  
  1274. static struct MachineDriver machine_driver_growl =
  1275. {
  1276.     /* basic machine hardware */
  1277.     {
  1278.         {
  1279.             CPU_M68000,
  1280.             12000000,    /* 12 MHz ??? */
  1281.             growl_readmem, growl_writemem, 0, 0,
  1282.             liquidk_interrupt, 1
  1283.         },
  1284.         {
  1285.             CPU_Z80 | CPU_AUDIO_CPU,
  1286.             4000000,    /* 4 MHz ??? */
  1287.             sound_readmem, sound_writemem, 0, 0,
  1288.             ignore_interrupt, 0    /* IRQs are triggered by the YM2610 */
  1289.         }
  1290.     },
  1291.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  1292.     1,
  1293.     0,
  1294.  
  1295.     /* video hardware */
  1296.     40*8, 32*8, { 0*8, 40*8-1, 2*8, 30*8-1 },
  1297.  
  1298.     gfxdecodeinfo,
  1299.     4096, 4096,
  1300.     0,
  1301.  
  1302.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  1303.     0,
  1304.     taitof2_vh_start,
  1305.     taitof2_vh_stop,
  1306.     taitof2_vh_screenrefresh,
  1307.  
  1308.     /* sound hardware */
  1309.     SOUND_SUPPORTS_STEREO,0,0,0,
  1310.     {
  1311.         {
  1312.             SOUND_YM2610,
  1313.             &ym2610_interface
  1314.         }
  1315.     }
  1316. };
  1317.  
  1318. static struct MachineDriver machine_driver_pulirula =
  1319. {
  1320.     /* basic machine hardware */
  1321.     {
  1322.         {
  1323.             CPU_M68000,
  1324.             12000000,    /* 12 MHz ??? */
  1325.             pulirula_readmem, pulirula_writemem, 0, 0,
  1326.             liquidk_interrupt, 1
  1327.         },
  1328.         {
  1329.             CPU_Z80 | CPU_AUDIO_CPU,
  1330.             4000000,    /* 4 MHz ??? */
  1331.             sound_readmem, sound_writemem, 0, 0,
  1332.             ignore_interrupt, 0    /* IRQs are triggered by the YM2610 */
  1333.         }
  1334.     },
  1335.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  1336.     1,
  1337.     0,
  1338.  
  1339.     /* video hardware */
  1340.     40*8, 32*8, { 0*8, 40*8-1, 2*8, 30*8-1 },
  1341.  
  1342.     gfxdecodeinfo,
  1343.     4096, 4096,
  1344.     0,
  1345.  
  1346.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  1347.     0,
  1348.     taitof2_vh_start,
  1349.     taitof2_vh_stop,
  1350.     taitof2_vh_screenrefresh,
  1351.  
  1352.     /* sound hardware */
  1353.     SOUND_SUPPORTS_STEREO,0,0,0,
  1354.     {
  1355.         {
  1356.             SOUND_YM2610,
  1357.             &ym2610_interface
  1358.         }
  1359.     }
  1360. };
  1361.  
  1362. static struct MachineDriver machine_driver_megab =
  1363. {
  1364.     /* basic machine hardware */
  1365.     {
  1366.         {
  1367.             CPU_M68000,
  1368.             12000000,    /* 12 MHz ??? */
  1369.             megab_readmem, megab_writemem, 0, 0,
  1370.             liquidk_interrupt, 1
  1371.         },
  1372.         {
  1373.             CPU_Z80 | CPU_AUDIO_CPU,
  1374.             4000000,    /* 4 MHz ??? */
  1375.             sound_readmem, sound_writemem, 0, 0,
  1376.             ignore_interrupt, 0    /* IRQs are triggered by the YM2610 */
  1377.         }
  1378.     },
  1379.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  1380.     1,
  1381.     cchip1_init_machine,
  1382.  
  1383.     /* video hardware */
  1384.     40*8, 32*8, { 0*8, 40*8-1, 2*8, 30*8-1 },
  1385.  
  1386.     gfxdecodeinfo,
  1387.     4096, 4096,
  1388.     0,
  1389.  
  1390.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  1391.     0,
  1392.     taitof2_vh_start,
  1393.     taitof2_vh_stop,
  1394.     taitof2_vh_screenrefresh,
  1395.  
  1396.     /* sound hardware */
  1397.     SOUND_SUPPORTS_STEREO,0,0,0,
  1398.     {
  1399.         {
  1400.             SOUND_YM2610,
  1401.             &ym2610_interface
  1402.         }
  1403.     }
  1404. };
  1405.  
  1406.  
  1407.  
  1408. /***************************************************************************
  1409.  
  1410.   Game driver(s)
  1411.  
  1412. ***************************************************************************/
  1413.  
  1414. ROM_START( finalb )
  1415.     ROM_REGION( 0x40000, REGION_CPU1 )     /* 256k for 68000 code */
  1416.     ROM_LOAD_EVEN( "fb_09.rom",  0x00000, 0x20000, 0x632f1ecd )
  1417.     ROM_LOAD_ODD ( "fb_17.rom",  0x00000, 0x20000, 0xe91b2ec9 )
  1418. //    ROM_LOAD_EVEN( "fb_m01.rom", 0x40000, 0x80000, 0xb63003c4 ) /* palette? */
  1419. //    ROM_LOAD_ODD ( "fb_m02.rom", 0x40000, 0x80000, 0x5802ee3c ) /* palette? */
  1420.  
  1421.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE)      /* temporary space for graphics (disposed after conversion) */
  1422.     ROM_LOAD( "fb_m06.rom", 0x000000, 0x020000, 0xfc450a25 )
  1423.     ROM_LOAD( "fb_m07.rom", 0x020000, 0x020000, 0xec3df577 )
  1424.  
  1425.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE)      /* temporary space for graphics (disposed after conversion) */
  1426.     ROM_LOAD( "fb_m03.rom", 0x000000, 0x080000, 0xdaa11561 ) /* sprites */
  1427.     ROM_LOAD( "fb_m04.rom", 0x080000, 0x080000, 0x6346f98e ) /* sprites */
  1428. //    ROM_LOAD( "fb_m05.rom", 0x000000, 0x080000, 0xaa90b93a ) /* palette? */
  1429.  
  1430.     ROM_REGION( 0x1c000, REGION_CPU2 )      /* sound cpu */
  1431.     ROM_LOAD( "fb_10.rom",   0x00000, 0x04000, 0xa38aaaed )
  1432.     ROM_CONTINUE(            0x10000, 0x0c000 ) /* banked stuff */
  1433.  
  1434.     ROM_REGION( 0x80000, REGION_SOUND1 )    /* ADPCM samples */
  1435.     ROM_LOAD( "fb_m05.rom", 0x00000, 0x80000, 0xaa90b93a ) /* palette? */
  1436. //    ROM_LOAD( "fb_m01.rom", 0x00000, 0x80000, 0xb63003c4 ) /* palette? */
  1437. //    ROM_LOAD( "fb_m02.rom", 0x80000, 0x80000, 0x5802ee3c ) /* palette? */
  1438. ROM_END
  1439.  
  1440. ROM_START( megab )
  1441.     ROM_REGION( 0x100000, REGION_CPU1 )     /* 256k for 68000 code */
  1442.     ROM_LOAD_EVEN( "c11-07",  0x00000, 0x20000, 0x11d228b6 )
  1443.     ROM_LOAD_ODD ( "c11-08",  0x00000, 0x20000, 0xa79d4dca )
  1444.  
  1445.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE)      /* temporary space for graphics (disposed after conversion) */
  1446.     ROM_LOAD( "c11-01", 0x000000, 0x080000, 0xfd1ea532 )
  1447. //    ROM_LOAD( "c11-02", 0x180000, 0x080000, 0x451cc187 )
  1448.  
  1449.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE)      /* temporary space for graphics (disposed after conversion) */
  1450.     ROM_LOAD( "c11-03", 0x000000, 0x080000, 0x46718c7a )
  1451.     ROM_LOAD( "c11-04", 0x080000, 0x080000, 0x663f33cc )
  1452.     ROM_LOAD( "c11-05", 0x100000, 0x080000, 0x733e6d8e )
  1453.  
  1454.     ROM_REGION( 0x1c000, REGION_CPU2 )      /* sound cpu */
  1455.     ROM_LOAD( "c11-12", 0x00000, 0x04000, 0xb11094f1 )
  1456.     ROM_CONTINUE(       0x10000, 0x0c000 ) /* banked stuff */
  1457.  
  1458.     ROM_REGION( 0x40000, REGION_SOUND1 )    /* ADPCM samples */
  1459.     ROM_LOAD( "c11-11", 0x00000, 0x20000, 0x263ecbf9 )
  1460.     ROM_LOAD( "c11-06", 0x20000, 0x20000, 0x7c249894 )
  1461. ROM_END
  1462.  
  1463. ROM_START( liquidk )
  1464.     ROM_REGION( 0x80000, REGION_CPU1 )     /* 512k for 68000 code */
  1465.     ROM_LOAD_EVEN( "lq09.bin",  0x00000, 0x20000, 0x6ae09eb9 )
  1466.     ROM_LOAD_ODD ( "lq11.bin",  0x00000, 0x20000, 0x42d2be6e )
  1467.     ROM_LOAD_EVEN( "lq10.bin",  0x40000, 0x20000, 0x50bef2e0 )
  1468.     ROM_LOAD_ODD ( "lq12.bin",  0x40000, 0x20000, 0xcb16bad5 )
  1469.  
  1470.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE)      /* temporary space for graphics (disposed after conversion) */
  1471.     ROM_LOAD( "lk_scr.bin",  0x000000, 0x080000, 0xc3364f9b )
  1472.  
  1473.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE)      /* temporary space for graphics (disposed after conversion) */
  1474.     ROM_LOAD( "lk_obj0.bin", 0x000000, 0x080000, 0x67cc3163 )
  1475.     ROM_LOAD( "lk_obj1.bin", 0x080000, 0x080000, 0xd2400710 )
  1476.  
  1477.     ROM_REGION( 0x1c000, REGION_CPU2 )      /* sound cpu */
  1478.     ROM_LOAD( "lq08.bin",    0x00000, 0x04000, 0x413c310c )
  1479.     ROM_CONTINUE(            0x10000, 0x0c000 ) /* banked stuff */
  1480.  
  1481.     ROM_REGION( 0x80000, REGION_SOUND1 )    /* ADPCM samples */
  1482.     ROM_LOAD( "lk_snd.bin",  0x00000, 0x80000, 0x474d45a4 )
  1483. ROM_END
  1484.  
  1485. ROM_START( liquidku )
  1486.     ROM_REGION( 0x80000, REGION_CPU1 )     /* 512k for 68000 code */
  1487.     ROM_LOAD_EVEN( "lq09.bin",  0x00000, 0x20000, 0x6ae09eb9 )
  1488.     ROM_LOAD_ODD ( "lq11.bin",  0x00000, 0x20000, 0x42d2be6e )
  1489.     ROM_LOAD_EVEN( "lq10.bin",  0x40000, 0x20000, 0x50bef2e0 )
  1490.     ROM_LOAD_ODD ( "lq14.bin",  0x40000, 0x20000, 0xbc118a43 )
  1491.  
  1492.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE)      /* temporary space for graphics (disposed after conversion) */
  1493.     ROM_LOAD( "lk_scr.bin",  0x000000, 0x080000, 0xc3364f9b )
  1494.  
  1495.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE)      /* temporary space for graphics (disposed after conversion) */
  1496.     ROM_LOAD( "lk_obj0.bin", 0x000000, 0x080000, 0x67cc3163 )
  1497.     ROM_LOAD( "lk_obj1.bin", 0x080000, 0x080000, 0xd2400710 )
  1498.  
  1499.     ROM_REGION( 0x1c000, REGION_CPU2 )      /* sound cpu */
  1500.     ROM_LOAD( "lq08.bin",    0x00000, 0x04000, 0x413c310c )
  1501.     ROM_CONTINUE(            0x10000, 0x0c000 ) /* banked stuff */
  1502.  
  1503.     ROM_REGION( 0x80000, REGION_SOUND1 )    /* ADPCM samples */
  1504.     ROM_LOAD( "lk_snd.bin",  0x00000, 0x80000, 0x474d45a4 )
  1505. ROM_END
  1506.  
  1507. ROM_START( mizubaku )
  1508.     ROM_REGION( 0x80000, REGION_CPU1 )     /* 512k for 68000 code */
  1509.     ROM_LOAD_EVEN( "lq09.bin",  0x00000, 0x20000, 0x6ae09eb9 )
  1510.     ROM_LOAD_ODD ( "lq11.bin",  0x00000, 0x20000, 0x42d2be6e )
  1511.     ROM_LOAD_EVEN( "lq10.bin",  0x40000, 0x20000, 0x50bef2e0 )
  1512.     ROM_LOAD_ODD ( "c49-13",    0x40000, 0x20000, 0x2518dbf9 )
  1513.  
  1514.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE)      /* temporary space for graphics (disposed after conversion) */
  1515.     ROM_LOAD( "lk_scr.bin",  0x000000, 0x080000, 0xc3364f9b )
  1516.  
  1517.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE)      /* temporary space for graphics (disposed after conversion) */
  1518.     ROM_LOAD( "lk_obj0.bin", 0x000000, 0x080000, 0x67cc3163 )
  1519.     ROM_LOAD( "lk_obj1.bin", 0x080000, 0x080000, 0xd2400710 )
  1520.  
  1521.     ROM_REGION( 0x1c000, REGION_CPU2 )      /* sound cpu */
  1522.     ROM_LOAD( "lq08.bin",    0x00000, 0x04000, 0x413c310c )
  1523.     ROM_CONTINUE(            0x10000, 0x0c000 ) /* banked stuff */
  1524.  
  1525.     ROM_REGION( 0x80000, REGION_SOUND1 )    /* ADPCM samples */
  1526.     ROM_LOAD( "lk_snd.bin",  0x00000, 0x80000, 0x474d45a4 )
  1527. ROM_END
  1528.  
  1529. ROM_START( growl )
  1530.     ROM_REGION( 0x100000, REGION_CPU1 )     /* 1024k for 68000 code */
  1531.     ROM_LOAD_EVEN( "growl_10.rom",  0x00000, 0x40000, 0xca81a20b )
  1532.     ROM_LOAD_ODD ( "growl_08.rom",  0x00000, 0x40000, 0xaa35dd9e )
  1533.     ROM_LOAD_EVEN( "growl_11.rom",  0x80000, 0x40000, 0xee3bd6d5 )
  1534.     ROM_LOAD_ODD ( "growl_14.rom",  0x80000, 0x40000, 0xb6c24ec7 )
  1535.  
  1536.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE)      /* temporary space for graphics (disposed after conversion) */
  1537.     ROM_LOAD( "growl_01.rom", 0x000000, 0x100000, 0x3434ce80 ) /* characters */
  1538.  
  1539.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE)      /* temporary space for graphics (disposed after conversion) */
  1540.     ROM_LOAD( "growl_03.rom", 0x000000, 0x100000, 0x1a0d8951 ) /* sprites */
  1541.     ROM_LOAD( "growl_02.rom", 0x100000, 0x100000, 0x15a21506 ) /* sprites */
  1542.  
  1543.     ROM_REGION( 0x1c000, REGION_CPU2 )      /* sound cpu */
  1544.     ROM_LOAD( "growl_12.rom", 0x00000, 0x04000, 0xbb6ed668 )
  1545.     ROM_CONTINUE(             0x10000, 0x0c000 ) /* banked stuff */
  1546.  
  1547.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* ADPCM samples */
  1548.     ROM_LOAD( "growl_04.rom", 0x000000, 0x100000, 0x2d97edf2 )
  1549.  
  1550.     ROM_REGION( 0x080000, REGION_SOUND2 )    /* ADPCM samples */
  1551.     ROM_LOAD( "growl_05.rom", 0x000000, 0x080000, 0xe29c0828 )
  1552. ROM_END
  1553.  
  1554. ROM_START( growlu )
  1555.     ROM_REGION( 0x100000, REGION_CPU1 )     /* 1024k for 68000 code */
  1556.     ROM_LOAD_EVEN( "growl_10.rom",  0x00000, 0x40000, 0xca81a20b )
  1557.     ROM_LOAD_ODD ( "growl_08.rom",  0x00000, 0x40000, 0xaa35dd9e )
  1558.     ROM_LOAD_EVEN( "growl_11.rom",  0x80000, 0x40000, 0xee3bd6d5 )
  1559.     ROM_LOAD_ODD ( "c74-13.rom",    0x80000, 0x40000, 0xc1c57e51 )
  1560.  
  1561.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE)
  1562.     ROM_LOAD( "growl_01.rom", 0x000000, 0x100000, 0x3434ce80 ) /* characters */
  1563.  
  1564.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE)
  1565.     ROM_LOAD( "growl_03.rom", 0x000000, 0x100000, 0x1a0d8951 ) /* sprites */
  1566.     ROM_LOAD( "growl_02.rom", 0x100000, 0x100000, 0x15a21506 ) /* sprites */
  1567.  
  1568.     ROM_REGION( 0x1c000, REGION_CPU2 )      /* sound cpu */
  1569.     ROM_LOAD( "growl_12.rom", 0x00000, 0x04000, 0xbb6ed668 )
  1570.     ROM_CONTINUE(             0x10000, 0x0c000 ) /* banked stuff */
  1571.  
  1572.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* ADPCM samples */
  1573.     ROM_LOAD( "growl_04.rom", 0x000000, 0x100000, 0x2d97edf2 )
  1574.  
  1575.     ROM_REGION( 0x080000, REGION_SOUND2 )    /* ADPCM samples */
  1576.     ROM_LOAD( "growl_05.rom", 0x000000, 0x080000, 0xe29c0828 )
  1577. ROM_END
  1578.  
  1579. ROM_START( runark )
  1580.     ROM_REGION( 0x100000, REGION_CPU1 )     /* 1024k for 68000 code */
  1581.     ROM_LOAD_EVEN( "growl_10.rom",  0x00000, 0x40000, 0xca81a20b )
  1582.     ROM_LOAD_ODD ( "growl_08.rom",  0x00000, 0x40000, 0xaa35dd9e )
  1583.     ROM_LOAD_EVEN( "growl_11.rom",  0x80000, 0x40000, 0xee3bd6d5 )
  1584.     ROM_LOAD_ODD ( "c74_09.14",     0x80000, 0x40000, 0x58cc2feb )
  1585.  
  1586.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE)
  1587.     ROM_LOAD( "growl_01.rom", 0x000000, 0x100000, 0x3434ce80 ) /* characters */
  1588.  
  1589.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE)
  1590.     ROM_LOAD( "growl_03.rom", 0x000000, 0x100000, 0x1a0d8951 ) /* sprites */
  1591.     ROM_LOAD( "growl_02.rom", 0x100000, 0x100000, 0x15a21506 ) /* sprites */
  1592.  
  1593.     ROM_REGION( 0x1c000, REGION_CPU2 )      /* sound cpu */
  1594.     ROM_LOAD( "growl_12.rom", 0x00000, 0x04000, 0xbb6ed668 )
  1595.     ROM_CONTINUE(             0x10000, 0x0c000 ) /* banked stuff */
  1596.  
  1597.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* ADPCM samples */
  1598.     ROM_LOAD( "growl_04.rom", 0x000000, 0x100000, 0x2d97edf2 )
  1599.  
  1600.     ROM_REGION( 0x080000, REGION_SOUND2 )    /* ADPCM samples */
  1601.     ROM_LOAD( "growl_05.rom", 0x000000, 0x080000, 0xe29c0828 )
  1602. ROM_END
  1603.  
  1604. ROM_START( pulirula )
  1605.     ROM_REGION( 0x100000, REGION_CPU1 )     /* 1024k for 68000 code */
  1606.     ROM_LOAD_EVEN( "c98-12.rom", 0x00000, 0x40000, 0x816d6cde )
  1607.     ROM_LOAD_ODD ( "c98-16.rom", 0x00000, 0x40000, 0x59df5c77 )
  1608.     ROM_LOAD_EVEN( "c98-06.rom", 0x80000, 0x20000, 0x64a71b45 ) /* ?? */
  1609.     ROM_LOAD_ODD ( "c98-07.rom", 0x80000, 0x20000, 0x90195bc0 ) /* ?? */
  1610.  
  1611.     ROM_REGION( 0x180000, REGION_GFX1 | REGIONFLAG_DISPOSE)
  1612.     ROM_LOAD( "c98-04.rom", 0x000000, 0x100000, 0x0e1fe3b2 ) /* sprites */
  1613.     ROM_LOAD( "c98-05.rom", 0x100000, 0x080000, 0x9ddd9c39 ) /* sprites ?? */
  1614. //    ROM_LOAD( "c98-05.rom", 0x000000, 0x080000, 0x9ddd9c39 ) /* sprites ?? */
  1615.  
  1616.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE)
  1617.     ROM_LOAD( "c98-03.rom", 0x000000, 0x100000, 0x589a678f ) /* sprites */
  1618.     ROM_LOAD( "c98-02.rom", 0x100000, 0x100000, 0x4a2ad2b3 ) /* sprites */
  1619.  
  1620.     ROM_REGION( 0x2c000, REGION_CPU2 )      /* sound cpu */
  1621.     ROM_LOAD( "c98-14.rom", 0x00000, 0x04000, 0xa858e17c )
  1622.     ROM_CONTINUE(           0x10000, 0x1c000 ) /* banked stuff */
  1623.  
  1624.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* ADPCM samples */
  1625.     ROM_LOAD( "c98-01.rom", 0x000000, 0x100000, 0x197f66f5 )
  1626. ROM_END
  1627.  
  1628.  
  1629.  
  1630. GAMEX( 1988, finalb,   0,       finalb,  finalb,  0, ROT0,   "Taito", "Final Blow", GAME_NO_COCKTAIL )
  1631. GAMEX( 1989, megab,    0,       megab,   megab,   0, ROT0,   "Taito", "Mega Blast", GAME_NO_COCKTAIL )
  1632. GAMEX( 1990, liquidk,  0,       liquidk, liquidk, 0, ROT180, "Taito Corporation Japan", "Liquid Kids (World)", GAME_NO_COCKTAIL )
  1633. GAMEX( 1990, liquidku, liquidk, liquidk, liquidk, 0, ROT180, "Taito America Corporation", "Liquid Kids (US)", GAME_NO_COCKTAIL )
  1634. GAMEX( 1990, mizubaku, liquidk, liquidk, liquidk, 0, ROT180, "Taito Corporation", "Mizubaku Daibouken (Japan)", GAME_NO_COCKTAIL )
  1635. GAMEX( 1990, growl,    0,       growl,   growl,   0, ROT0,   "Taito Corporation Japan", "Growl (World)", GAME_NO_COCKTAIL )
  1636. GAMEX( 1990, growlu,   growl,   growl,   growl,   0, ROT0,   "Taito America Corporation", "Growl (US)", GAME_NO_COCKTAIL )
  1637. GAMEX( 1990, runark,   growl,   growl,   growl,   0, ROT0,   "Taito Corporation", "Runark (Japan)", GAME_NO_COCKTAIL )
  1638. GAMEX( 1991, pulirula, 0,       pulirula,pulirula,0, ROT0,   "Taito Corporation", "PuLiRuLa", GAME_NO_COCKTAIL )
  1639.